package cn.smartorigin.soas.frame.panel;

import java.awt.BorderLayout;

import javax.swing.JComponent;
import javax.swing.JPanel;

import cn.smartorigin.soas.frame.tree.CellMutableTreeNode;

public class CellPagePanel extends JPanel  {
	
    private CellPagePanelToolbar leftToolbar = new CellPagePanelToolbar();
    private CellPagePanelToolbar rightToolbar = new CellPagePanelToolbar();
    private JPanel toolbarPane = new JPanel(new BorderLayout());
    private JPanel centerPane = new JPanel(new BorderLayout());
	
    public CellPagePanel() {
        this(null);
    }
       
    public CellPagePanel(JComponent contentComponent) {
        init(contentComponent);
    }

    public void  init(JComponent contentComponent) {
    	this.setLayout(new BorderLayout());

        
        toolbarPane.add(leftToolbar, BorderLayout.CENTER);
        toolbarPane.add(rightToolbar, BorderLayout.EAST);
        this.add(toolbarPane, BorderLayout.NORTH);
        this.add(centerPane, BorderLayout.CENTER);
        if (contentComponent != null) {
            centerPane.add(contentComponent, BorderLayout.CENTER);
        }

    }
    
//    private void init(JComponent contentComponent) {
//        this.setLayout(new BorderLayout());
//    }
    
    public CellPagePanelToolbar getLeftToolBar() {
        return leftToolbar;
    }

    public CellPagePanelToolbar getRightToolBar() {
        return rightToolbar;
    }
    
    public JPanel getCenterPane() {
        return this.centerPane;
    }


}
